﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;

namespace Puzzler.Utils
{
    public static class DialogUtils
    {
        public static T CreateFileDialog<T>() where T : FileDialog
        {
            T dlg = Activator.CreateInstance<T>();
            dlg.DefaultExt = "xpf|bpf|cpf";
            dlg.Filter =
                "Xml Puzzle File (*.xpf)|*.xpf|" +
                "Binary Puzzle File (*.bpf)|*.bpf|" +
                "Compressed Puzzle File (*.cpf)|*.cpf";

            return dlg;
        }
    }
}
